"""
======================
@Software:PyCharm
@author:LiMengJie
@time:2023/2/321:10
@File:线性规划2.py
 -*- coding: utf-8 -*-
======================
"""
import numpy as np
from scipy.optimize import linprog

c = [-1, 4]
A = [[-3, 1], [1, 2]]
b = [6, 4]
bound = ((None, None), (-3, None))
res = linprog(c, A, b, None, bound)
print(res.fun)  # 显示目标函数最小值
print(res.x)  # 显示最优解
